home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-04-12 | 8.4 KB | [TEXT/MPCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Wed Apr 12 01:19:18 1995, modified Wed Apr 12 01:19:18 1995, creator 'MPCC', type ASCII, 7871 bytes "Grating.c" , at 0x1f3f 492 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 47 72 61 74 69 6e | 67 2e 63 00 00 00 00 00 |..Gratin|g.c.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 43 | 43 00 00 00 00 00 00 00 |.TEXTMPC|C.......|
|00000050| 00 00 00 00 00 1e bf 00 | 00 01 ec ab b1 13 56 ab |........|......V.|
|00000060| b1 13 56 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..V.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 9d a8 00 00 |........|........|
|00000080| 2f 2a 0d 47 72 61 74 69 | 6e 67 2e 63 0d 54 68 69 |/*.Grati|ng.c.Thi|
|00000090| 73 20 64 65 6d 6f 20 73 | 68 6f 77 73 20 68 6f 77 |s demo s|hows how|
|000000a0| 20 74 6f 20 6c 6f 61 64 | 20 74 68 65 20 63 6c 75 | to load| the clu|
|000000b0| 74 20 61 6e 64 20 70 75 | 74 20 61 20 76 69 67 6e |t and pu|t a vign|
|000000c0| 65 74 74 65 64 20 67 72 | 61 74 69 6e 67 20 6f 6e |etted gr|ating on|
|000000d0| 74 6f 20 74 68 65 0d 73 | 63 72 65 65 6e 2e 20 49 |to the.s|creen. I|
|000000e0| 74 20 61 6c 73 6f 20 73 | 61 76 65 73 20 74 68 65 |t also s|aves the|
|000000f0| 20 69 6d 61 67 65 20 74 | 6f 20 64 69 73 6b 20 61 | image t|o disk a|
|00000100| 73 20 61 20 50 49 43 54 | 20 66 69 6c 65 2e 20 54 |s a PICT| file. T|
|00000110| 68 69 73 20 64 65 6d 6f | 20 68 61 73 20 62 65 65 |his demo| has bee|
|00000120| 6e 20 6b 65 70 74 0d 61 | 73 20 73 69 6d 70 6c 65 |n kept.a|s simple|
|00000130| 20 61 73 20 70 6f 73 73 | 69 62 6c 65 2c 20 74 6f | as poss|ible, to|
|00000140| 20 65 6e 68 61 6e 63 65 | 20 72 65 61 64 61 62 69 | enhance| readabi|
|00000150| 6c 69 74 79 2c 20 66 6f | 72 73 61 6b 69 6e 67 20 |lity, fo|rsaking |
|00000160| 61 63 63 75 72 61 74 65 | 20 63 6f 6e 74 72 6f 6c |accurate| control|
|00000170| 20 6f 66 0d 74 69 6d 65 | 20 61 6e 64 20 63 6f 6e | of.time| and con|
|00000180| 74 72 61 73 74 20 6f 66 | 20 74 68 65 20 73 74 69 |trast of| the sti|
|00000190| 6d 75 6c 75 73 2e 20 54 | 68 65 20 46 6c 69 63 6b |mulus. T|he Flick|
|000001a0| 65 72 69 6e 67 47 72 61 | 74 69 6e 67 20 64 65 6d |eringGra|ting dem|
|000001b0| 6f 2c 20 6f 6e 20 74 68 | 65 20 6f 74 68 65 72 0d |o, on th|e other.|
|000001c0| 68 61 6e 64 2c 20 69 73 | 20 73 6f 6d 65 77 68 61 |hand, is| somewha|
|000001d0| 74 20 6d 6f 72 65 20 65 | 6c 61 62 6f 72 61 74 65 |t more e|laborate|
|000001e0| 20 61 6e 64 20 70 72 65 | 73 65 6e 74 73 20 61 20 | and pre|sents a |
|000001f0| 72 65 73 65 61 72 63 68 | 2d 67 72 61 64 65 20 73 |research|-grade s|
|00000200| 74 69 6d 75 6c 75 73 20 | 69 66 20 74 68 65 0d 4c |timulus |if the.L|
|00000210| 75 6d 69 6e 61 6e 63 65 | 52 65 63 6f 72 64 2e 68 |uminance|Record.h|
|00000220| 20 63 61 6c 69 62 72 61 | 74 69 6f 6e 20 64 61 74 | calibra|tion dat|
|00000230| 61 20 61 72 65 20 61 63 | 63 75 72 61 74 65 2e 0d |a are ac|curate..|
|00000240| 0d 46 6f 72 20 61 20 72 | 65 61 6c 20 65 78 70 65 |.For a r|eal expe|
|00000250| 72 69 6d 65 6e 74 20 74 | 68 65 72 65 20 61 72 65 |riment t|here are|
|00000260| 20 73 6f 6d 65 20 72 65 | 66 69 6e 65 6d 65 6e 74 | some re|finement|
|00000270| 73 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 63 6f 6e |s you sh|ould con|
|00000280| 73 69 64 65 72 2e 20 54 | 68 69 73 20 64 65 6d 6f |sider. T|his demo|
|00000290| 0d 74 61 6b 65 73 20 61 | 20 77 68 69 6c 65 20 74 |.takes a| while t|
|000002a0| 6f 20 63 72 65 61 74 65 | 20 74 68 65 20 69 6d 61 |o create| the ima|
|000002b0| 67 65 20 6f 6e 20 74 68 | 65 20 73 63 72 65 65 6e |ge on th|e screen|
|000002c0| 2c 20 62 75 74 20 79 6f | 75 20 70 72 6f 62 61 62 |, but yo|u probab|
|000002d0| 6c 79 20 77 61 6e 74 0d | 66 72 61 6d 65 2d 61 63 |ly want.|frame-ac|
|000002e0| 63 75 72 61 74 65 20 74 | 69 6d 69 6e 67 20 69 6e |curate t|iming in|
|000002f0| 20 79 6f 75 72 20 65 78 | 70 65 72 69 6d 65 6e 74 | your ex|periment|
|00000300| 2e 20 59 6f 75 20 63 6f | 75 6c 64 20 65 69 74 68 |. You co|uld eith|
|00000310| 65 72 20 63 72 65 61 74 | 65 20 74 68 65 20 69 6d |er creat|e the im|
|00000320| 61 67 65 20 69 6e 0d 61 | 6e 20 6f 66 66 73 63 72 |age in.a|n offscr|
|00000330| 65 65 6e 20 47 57 6f 72 | 6c 64 20 61 6e 64 20 63 |een GWor|ld and c|
|00000340| 6f 70 79 20 69 74 20 74 | 6f 20 74 68 65 20 73 63 |opy it t|o the sc|
|00000350| 72 65 65 6e 20 77 69 74 | 68 20 43 6f 70 79 42 69 |reen wit|h CopyBi|
|00000360| 74 73 51 75 69 63 6b 6c | 79 2e 20 4f 72 20 79 6f |tsQuickl|y. Or yo|
|00000370| 75 20 63 6f 75 6c 64 0d | 73 65 74 20 74 68 65 20 |u could.|set the |
|00000380| 63 6c 75 74 20 74 6f 20 | 75 6e 69 66 6f 72 6d 20 |clut to |uniform |
|00000390| 67 72 61 79 20 28 65 76 | 65 72 79 20 63 6c 75 74 |gray (ev|ery clut|
|000003a0| 20 65 6e 74 72 79 20 65 | 71 75 61 6c 20 74 6f 20 | entry e|qual to |
|000003b0| 74 68 65 20 62 61 63 6b | 67 72 6f 75 6e 64 0d 6c |the back|ground.l|
|000003c0| 75 6d 69 6e 61 6e 63 65 | 29 20 77 68 69 6c 65 20 |uminance|) while |
|000003d0| 79 6f 75 27 72 65 20 63 | 6f 6d 70 75 74 69 6e 67 |you're c|omputing|
|000003e0| 20 74 68 65 20 69 6d 61 | 67 65 20 6f 6e 2d 73 63 | the ima|ge on-sc|
|000003f0| 72 65 65 6e 2c 20 61 6e | 64 20 74 68 65 6e 20 6c |reen, an|d then l|
|00000400| 6f 61 64 20 61 20 67 72 | 61 79 73 63 61 6c 65 0d |oad a gr|ayscale.|
|00000410| 72 61 6d 70 20 69 6e 74 | 6f 20 74 68 65 20 63 6c |ramp int|o the cl|
|00000420| 75 74 20 77 68 65 6e 20 | 79 6f 75 20 77 61 6e 74 |ut when |you want|
|00000430| 20 74 68 65 20 64 69 73 | 70 6c 61 79 20 74 6f 20 | the dis|play to |
|00000440| 73 74 61 72 74 2e 20 53 | 69 6d 69 6c 61 72 6c 79 |start. S|imilarly|
|00000450| 20 79 6f 75 20 63 61 6e | 20 6d 61 6b 65 0d 74 68 | you can| make.th|
|00000460| 65 20 69 6d 61 67 65 20 | 64 69 73 61 70 70 65 61 |e image |disappea|
|00000470| 72 20 62 79 20 6c 6f 61 | 64 69 6e 67 20 61 20 6e |r by loa|ding a n|
|00000480| 65 77 20 69 6d 61 67 65 | 2c 20 63 61 6c 6c 69 6e |ew image|, callin|
|00000490| 67 20 45 72 61 73 65 52 | 65 63 74 28 29 2c 20 6f |g EraseR|ect(), o|
|000004a0| 72 20 6c 6f 61 64 69 6e | 67 20 0d 61 20 75 6e 69 |r loadin|g .a uni|
|000004b0| 66 6f 72 6d 2d 67 72 61 | 79 20 63 6c 75 74 2e 0d |form-gra|y clut..|
|000004c0| 0d 41 6e 6f 74 68 65 72 | 20 69 73 73 75 65 20 74 |.Another| issue t|
|000004d0| 68 61 74 20 6d 61 74 74 | 65 72 73 20 66 6f 72 20 |hat matt|ers for |
|000004e0| 61 20 72 65 61 6c 20 65 | 78 70 65 72 69 6d 65 6e |a real e|xperimen|
|000004f0| 74 20 69 73 20 67 61 6d | 6d 61 20 63 6f 72 72 65 |t is gam|ma corre|
|00000500| 63 74 69 6f 6e 2e 20 54 | 68 65 0d 6e 75 6d 62 65 |ction. T|he.numbe|
|00000510| 72 73 20 6c 6f 61 64 65 | 64 20 69 6e 74 6f 20 74 |rs loade|d into t|
|00000520| 68 65 20 63 6c 75 74 20 | 61 72 65 20 66 61 69 74 |he clut |are fait|
|00000530| 68 66 75 6c 6c 79 20 74 | 72 61 6e 73 66 6f 72 6d |hfully t|ransform|
|00000540| 65 64 20 69 6e 74 6f 20 | 76 6f 6c 74 61 67 65 73 |ed into |voltages|
|00000550| 20 62 79 20 74 68 65 0d | 74 68 72 65 65 20 64 69 | by the.|three di|
|00000560| 67 69 74 61 6c 2d 74 6f | 2d 61 6e 61 6c 6f 67 20 |gital-to|-analog |
|00000570| 63 6f 6e 76 65 72 74 65 | 72 73 20 6f 6e 20 79 6f |converte|rs on yo|
|00000580| 75 72 20 76 69 64 65 6f | 20 63 61 72 64 2c 20 62 |ur video| card, b|
|00000590| 75 74 20 74 68 65 20 72 | 65 73 75 6c 74 69 6e 67 |ut the r|esulting|
|000005a0| 0d 6c 75 6d 69 6e 61 6e | 63 65 20 70 72 6f 64 75 |.luminan|ce produ|
|000005b0| 63 65 64 20 6f 6e 20 79 | 6f 75 72 20 6d 6f 6e 69 |ced on y|our moni|
|000005c0| 74 6f 72 20 77 69 6c 6c | 20 62 65 20 61 6e 20 61 |tor will| be an a|
|000005d0| 70 70 72 6f 78 69 6d 61 | 74 65 6c 79 20 70 61 72 |pproxima|tely par|
|000005e0| 61 62 6f 6c 69 63 20 66 | 75 6e 63 74 69 6f 6e 0d |abolic f|unction.|
|000005f0| 6f 66 20 74 68 65 20 76 | 69 64 65 6f 20 76 6f 6c |of the v|ideo vol|
|00000600| 74 61 67 65 2e 20 41 70 | 70 6c 65 20 70 72 6f 76 |tage. Ap|ple prov|
|00000610| 69 64 65 73 20 63 72 75 | 64 65 20 67 61 6d 6d 61 |ides cru|de gamma|
|00000620| 20 63 6f 72 72 65 63 74 | 69 6f 6e 20 62 79 20 6d | correct|ion by m|
|00000630| 65 61 6e 73 20 6f 66 20 | 61 0d 67 65 6e 65 72 69 |eans of |a.generi|
|00000640| 63 20 38 2d 62 69 74 20 | 67 61 6d 6d 61 20 74 61 |c 8-bit |gamma ta|
|00000650| 62 6c 65 20 69 6e 20 74 | 68 65 20 76 69 64 65 6f |ble in t|he video|
|00000660| 20 64 72 69 76 65 72 2c | 20 77 68 69 63 68 20 64 | driver,| which d|
|00000670| 6f 65 73 20 6d 61 6b 65 | 20 74 68 69 6e 67 73 20 |oes make| things |
|00000680| 6c 6f 6f 6b 0d 62 65 74 | 74 65 72 2c 20 62 75 74 |look.bet|ter, but|
|00000690| 20 69 73 20 6e 6f 74 20 | 61 63 63 75 72 61 74 65 | is not |accurate|
|000006a0| 6c 79 20 6d 61 74 63 68 | 65 64 20 74 6f 20 74 68 |ly match|ed to th|
|000006b0| 65 20 67 61 6d 6d 61 20 | 6f 66 20 79 6f 75 72 20 |e gamma |of your |
|000006c0| 70 61 72 74 69 63 75 6c | 61 72 20 6d 6f 6e 69 74 |particul|ar monit|
|000006d0| 6f 72 2c 0d 77 68 69 63 | 68 20 64 65 70 65 6e 64 |or,.whic|h depend|
|000006e0| 73 20 6f 6e 20 74 68 65 | 20 63 75 72 72 65 6e 74 |s on the| current|
|000006f0| 20 73 65 74 74 69 6e 67 | 73 20 6f 66 20 69 74 73 | setting|s of its|
|00000700| 20 62 72 69 67 68 74 6e | 65 73 73 20 61 6e 64 20 | brightn|ess and |
|00000710| 63 6f 6e 74 72 61 73 74 | 20 6b 6e 6f 62 73 2e 0d |contrast| knobs..|
|00000720| 46 75 72 74 68 65 72 6d | 6f 72 65 20 74 68 65 20 |Furtherm|ore the |
|00000730| 41 70 70 6c 65 20 38 2d | 62 69 74 20 67 61 6d 6d |Apple 8-|bit gamm|
|00000740| 61 2d 63 6f 72 72 65 63 | 74 69 6f 6e 20 73 63 68 |a-correc|tion sch|
|00000750| 65 6d 65 2c 20 77 68 69 | 63 68 20 73 69 6d 70 6c |eme, whi|ch simpl|
|00000760| 79 20 74 72 61 6e 73 66 | 6f 72 6d 73 20 74 68 65 |y transf|orms the|
|00000770| 0d 6e 6f 6d 69 6e 61 6c | 20 38 2d 62 69 74 20 63 |.nominal| 8-bit c|
|00000780| 6c 75 74 20 76 61 6c 75 | 65 20 69 6e 74 6f 20 61 |lut valu|e into a|
|00000790| 20 6e 65 77 20 38 2d 62 | 69 74 20 63 6c 75 74 20 | new 8-b|it clut |
|000007a0| 76 61 6c 75 65 2c 20 6e | 65 63 65 73 73 61 72 69 |value, n|ecessari|
|000007b0| 6c 79 20 72 65 73 74 72 | 69 63 74 73 20 74 68 65 |ly restr|icts the|
|000007c0| 0d 72 61 6e 67 65 20 6f | 66 20 61 76 61 69 6c 61 |.range o|f availa|
|000007d0| 62 6c 65 20 76 61 6c 75 | 65 73 2c 20 6d 61 70 70 |ble valu|es, mapp|
|000007e0| 69 6e 67 20 73 65 76 65 | 72 61 6c 20 6f 6e 74 6f |ing seve|ral onto|
|000007f0| 20 6f 6e 65 20 6f 75 74 | 70 75 74 20 76 61 6c 75 | one out|put valu|
|00000800| 65 2c 20 61 6e 64 20 6f | 6d 69 74 74 69 6e 67 0d |e, and o|mitting.|
|00000810| 73 6f 6d 65 20 6f 75 74 | 70 75 74 20 76 61 6c 75 |some out|put valu|
|00000820| 65 73 2e 20 49 6e 20 6f | 74 68 65 72 20 77 6f 72 |es. In o|ther wor|
|00000830| 64 73 20 79 6f 75 72 20 | 6c 75 6d 69 6e 61 6e 63 |ds your |luminanc|
|00000840| 65 73 20 77 69 6c 6c 20 | 62 65 20 38 2d 62 69 74 |es will |be 8-bit|
|00000850| 20 71 75 61 6e 74 69 7a | 65 64 0d 74 77 69 63 65 | quantiz|ed.twice|
|00000860| 2c 20 62 6f 74 68 20 62 | 65 66 6f 72 65 20 61 6e |, both b|efore an|
|00000870| 64 20 61 66 74 65 72 20 | 67 61 6d 6d 61 20 63 6f |d after |gamma co|
|00000880| 72 72 65 63 74 69 6f 6e | 2e 20 49 74 20 69 73 20 |rrection|. It is |
|00000890| 70 72 65 66 65 72 61 62 | 6c 65 20 74 6f 20 64 6f |preferab|le to do|
|000008a0| 20 67 61 6d 6d 61 0d 63 | 6f 72 72 65 63 74 69 6f | gamma.c|orrectio|
|000008b0| 6e 20 66 69 72 73 74 2c | 20 77 69 74 68 6f 75 74 |n first,| without|
|000008c0| 20 71 75 61 6e 74 69 7a | 61 74 69 6f 6e 2e 20 54 | quantiz|ation. T|
|000008d0| 68 65 72 65 66 6f 72 65 | 20 49 20 73 75 67 67 65 |herefore| I sugge|
|000008e0| 73 74 20 79 6f 75 20 65 | 6c 69 6d 69 6e 61 74 65 |st you e|liminate|
|000008f0| 0d 41 70 70 6c 65 27 73 | 20 67 61 6d 6d 61 20 63 |.Apple's| gamma c|
|00000900| 6f 72 72 65 63 74 69 6f | 6e 2c 20 62 79 20 63 61 |orrectio|n, by ca|
|00000910| 6c 6c 69 6e 67 20 47 44 | 55 6e 63 6f 72 72 65 63 |lling GD|Uncorrec|
|00000920| 74 65 64 47 61 6d 6d 61 | 28 29 2c 20 61 6e 64 20 |tedGamma|(), and |
|00000930| 75 73 65 20 74 68 65 0d | 4c 75 6d 69 6e 61 6e 63 |use the.|Luminanc|
|00000940| 65 2e 63 20 70 61 63 6b | 61 67 65 20 74 6f 20 64 |e.c pack|age to d|
|00000950| 6f 20 67 61 6d 6d 61 20 | 63 6f 72 72 65 63 74 69 |o gamma |correcti|
|00000960| 6f 6e 2e 20 54 68 61 74 | 20 70 61 63 6b 61 67 65 |on. That| package|
|00000970| 20 69 6d 70 6c 65 6d 65 | 6e 74 73 20 74 68 65 0d | impleme|nts the.|
|00000980| 70 75 62 6c 69 73 68 65 | 64 20 61 6c 67 6f 72 69 |publishe|d algori|
|00000990| 74 68 6d 20 6f 66 20 50 | 65 6c 6c 69 20 61 6e 64 |thm of P|elli and|
|000009a0| 20 5a 68 61 6e 67 20 28 | 31 39 39 31 29 2e 20 54 | Zhang (|1991). T|
|000009b0| 68 65 20 46 6c 69 63 6b | 65 72 69 6e 67 47 72 61 |he Flick|eringGra|
|000009c0| 74 69 6e 67 20 64 65 6d | 6f 20 75 73 65 73 0d 4c |ting dem|o uses.L|
|000009d0| 75 6d 69 6e 61 6e 63 65 | 2e 63 2e 0d 0d 57 68 79 |uminance|.c...Why|
|000009e0| 20 6e 6f 74 20 6d 65 72 | 67 65 20 6d 61 69 6e 28 | not mer|ge main(|
|000009f0| 29 20 61 6e 64 20 47 72 | 61 74 69 6e 67 28 29 3f |) and Gr|ating()?|
|00000a00| 20 54 68 65 20 63 61 6c | 6c 20 74 6f 20 52 65 71 | The cal|l to Req|
|00000a10| 75 69 72 65 28 29 20 63 | 68 65 63 6b 73 20 66 6f |uire() c|hecks fo|
|00000a20| 72 20 61 6e 79 20 6e 65 | 65 64 65 64 0d 68 61 72 |r any ne|eded.har|
|00000a30| 64 77 61 72 65 2e 20 49 | 74 20 69 73 20 76 69 74 |dware. I|t is vit|
|00000a40| 61 6c 20 74 68 61 74 20 | 61 20 74 65 73 74 20 66 |al that |a test f|
|00000a50| 6f 72 20 74 68 65 20 70 | 72 65 73 65 6e 63 65 20 |or the p|resence |
|00000a60| 6f 66 20 61 20 6e 65 65 | 64 65 64 20 66 6c 6f 61 |of a nee|ded floa|
|00000a70| 74 69 6e 67 20 70 6f 69 | 6e 74 0d 75 6e 69 74 20 |ting poi|nt.unit |
|00000a80| 62 65 20 64 6f 6e 65 20 | 62 65 66 6f 72 65 20 65 |be done |before e|
|00000a90| 6e 74 65 72 69 6e 67 20 | 61 6e 79 20 72 6f 75 74 |ntering |any rout|
|00000aa0| 69 6e 65 2c 20 65 2e 67 | 2e 20 47 72 61 74 69 6e |ine, e.g|. Gratin|
|00000ab0| 67 28 29 2c 20 74 68 61 | 74 20 75 73 65 73 20 74 |g(), tha|t uses t|
|00000ac0| 68 65 20 66 70 75 2c 0d | 62 65 63 61 75 73 65 20 |he fpu,.|because |
|00000ad0| 74 68 65 20 54 48 49 4e | 4b 20 43 20 63 6f 6d 70 |the THIN|K C comp|
|00000ae0| 69 6c 65 72 20 74 79 70 | 69 63 61 6c 6c 79 20 70 |iler typ|ically p|
|00000af0| 72 6f 64 75 63 65 73 20 | 63 6f 64 65 20 74 68 61 |roduces |code tha|
|00000b00| 74 20 61 63 63 65 73 73 | 65 73 20 74 68 65 20 66 |t access|es the f|
|00000b10| 70 75 2c 20 74 6f 0d 73 | 61 76 65 20 66 70 75 20 |pu, to.s|ave fpu |
|00000b20| 72 65 67 69 73 74 65 72 | 73 2c 20 61 74 20 74 68 |register|s, at th|
|00000b30| 65 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 74 |e beginn|ing of t|
|00000b40| 68 65 20 72 6f 75 74 69 | 6e 65 2c 20 73 6f 20 61 |he routi|ne, so a|
|00000b50| 6e 79 20 73 75 62 73 65 | 71 75 65 6e 74 20 63 68 |ny subse|quent ch|
|00000b60| 65 63 6b 0d 77 6f 75 6c | 64 20 62 65 20 74 6f 6f |eck.woul|d be too|
|00000b70| 20 6c 61 74 65 2e 0d 0d | 48 49 53 54 4f 52 59 3a | late...|HISTORY:|
|00000b80| 0d 32 2f 37 2f 39 33 09 | 64 67 70 20 77 72 6f 74 |.2/7/93.|dgp wrot|
|00000b90| 65 20 69 74 2c 20 61 73 | 20 61 6e 20 61 6e 73 77 |e it, as| an answ|
|00000ba0| 65 72 20 74 6f 20 71 75 | 65 73 74 69 6f 6e 73 20 |er to qu|estions |
|00000bb0| 66 72 6f 6d 20 42 69 6c | 6c 20 4d 65 72 69 67 61 |from Bil|l Meriga|
|00000bc0| 6e 20 61 6e 64 20 44 61 | 76 69 64 20 42 72 61 69 |n and Da|vid Brai|
|00000bd0| 6e 61 72 64 2e 0d 32 2f | 31 38 2f 39 33 09 64 67 |nard..2/|18/93.dg|
|00000be0| 70 09 61 64 64 65 64 20 | 66 70 75 20 74 65 73 74 |p.added |fpu test|
|00000bf0| 2e 0d 32 2f 32 33 2f 39 | 33 09 64 67 70 09 75 73 |..2/23/9|3.dgp.us|
|00000c00| 65 20 6e 65 77 20 47 44 | 4f 70 65 6e 57 69 6e 64 |e new GD|OpenWind|
|00000c10| 6f 77 31 20 61 6e 64 20 | 47 44 44 69 73 70 6f 73 |ow1 and |GDDispos|
|00000c20| 65 57 69 6e 64 6f 77 31 | 2e 0d 34 2f 31 38 2f 39 |eWindow1|..4/18/9|
|00000c30| 33 09 64 67 70 09 73 75 | 70 70 6f 72 74 20 64 69 |3.dgp.su|pport di|
|00000c40| 72 65 63 74 54 79 70 65 | 2e 0d 37 2f 37 2f 39 33 |rectType|..7/7/93|
|00000c50| 09 64 67 70 09 70 72 65 | 66 65 72 20 73 63 72 65 |.dgp.pre|fer scre|
|00000c60| 65 6e 20 31 2e 20 41 64 | 64 65 64 20 53 63 72 6f |en 1. Ad|ded Scro|
|00000c70| 6c 6c 52 65 63 74 20 66 | 6f 72 20 63 6f 6d 70 61 |llRect f|or compa|
|00000c80| 74 69 62 69 6c 69 74 79 | 20 77 69 74 68 20 52 61 |tibility| with Ra|
|00000c90| 64 69 75 73 20 50 6f 77 | 65 72 56 69 65 77 2e 0d |dius Pow|erView..|
|00000ca0| 31 30 2f 32 2f 39 33 09 | 64 67 70 09 61 64 64 65 |10/2/93.|dgp.adde|
|00000cb0| 64 20 53 41 56 45 5f 50 | 49 43 54 20 74 6f 20 74 |d SAVE_P|ICT to t|
|00000cc0| 65 73 74 20 50 69 78 4d | 61 70 54 6f 50 49 43 54 |est PixM|apToPICT|
|00000cd0| 28 29 2e 0d 34 2f 32 37 | 2f 39 34 20 64 67 70 20 |()..4/27|/94 dgp |
|00000ce0| 6e 6f 77 20 61 73 6b 20 | 75 73 65 72 20 77 68 65 |now ask |user whe|
|00000cf0| 74 68 65 72 20 74 6f 20 | 73 61 76 65 20 67 72 61 |ther to |save gra|
|00000d00| 74 69 6e 67 20 61 73 20 | 50 49 43 54 2e 0d 38 2f |ting as |PICT..8/|
|00000d10| 31 31 2f 39 34 09 64 67 | 70 20 64 6f 6e 27 74 20 |11/94.dg|p don't |
|00000d20| 72 65 64 65 66 69 6e 65 | 20 22 73 69 6e 22 2e 0d |redefine| "sin"..|
|00000d30| 39 2f 35 2f 39 34 20 64 | 67 70 20 72 65 6d 6f 76 |9/5/94 d|gp remov|
|00000d40| 65 64 20 61 73 73 75 6d | 70 74 69 6f 6e 20 69 6e |ed assum|ption in|
|00000d50| 20 70 72 69 6e 74 66 27 | 73 20 74 68 61 74 20 69 | printf'|s that i|
|00000d60| 6e 74 3d 3d 73 68 6f 72 | 74 2e 0d 33 2f 32 30 2f |nt==shor|t..3/20/|
|00000d70| 39 35 20 64 67 70 20 72 | 65 6d 6f 76 65 64 20 53 |95 dgp r|emoved S|
|00000d80| 65 6c 65 63 74 57 69 6e | 64 6f 77 28 29 20 77 6f |electWin|dow() wo|
|00000d90| 72 6b 61 72 6f 75 6e 64 | 20 66 6f 72 20 43 57 35 |rkaround| for CW5|
|00000da0| 20 53 49 4f 55 58 20 62 | 75 67 2e 0d 34 2f 31 31 | SIOUX b|ug..4/11|
|00000db0| 2f 39 35 20 64 67 70 20 | 73 65 74 20 61 6e 64 20 |/95 dgp |set and |
|00000dc0| 72 65 73 74 6f 72 65 20 | 64 69 73 70 6c 61 79 20 |restore |display |
|00000dd0| 64 65 70 74 68 20 61 6e | 64 20 63 6f 6c 6f 72 2e |depth an|d color.|
|00000de0| 20 55 73 65 20 43 68 6f | 6f 73 65 53 63 72 65 65 | Use Cho|oseScree|
|00000df0| 6e 28 29 2e 0d 2a 2f 0d | 23 69 6e 63 6c 75 64 65 |n()..*/.|#include|
|00000e00| 20 22 56 69 64 65 6f 54 | 6f 6f 6c 62 6f 78 2e 68 | "VideoT|oolbox.h|
|00000e10| 22 0d 23 69 6e 63 6c 75 | 64 65 20 3c 6d 61 74 68 |".#inclu|de <math|
|00000e20| 2e 68 3e 0d 23 69 66 20 | 28 54 48 49 4e 4b 5f 43 |.h>.#if |(THINK_C|
|00000e30| 20 7c 7c 20 54 48 49 4e | 4b 5f 43 50 4c 55 53 29 | || THIN|K_CPLUS)|
|00000e40| 0d 09 23 69 6e 63 6c 75 | 64 65 20 3c 63 6f 6e 73 |..#inclu|de <cons|
|00000e50| 6f 6c 65 2e 68 3e 0d 23 | 65 6e 64 69 66 0d 23 69 |ole.h>.#|endif.#i|
|00000e60| 66 20 5f 5f 4d 57 45 52 | 4b 53 5f 5f 0d 09 23 69 |f __MWER|KS__..#i|
|00000e70| 6e 63 6c 75 64 65 20 3c | 53 49 4f 55 58 2e 68 3e |nclude <|SIOUX.h>|
|00000e80| 0d 23 65 6e 64 69 66 0d | 23 69 66 20 55 4e 49 56 |.#endif.|#if UNIV|
|00000e90| 45 52 53 41 4c 5f 48 45 | 41 44 45 52 53 0d 09 23 |ERSAL_HE|ADERS..#|
|00000ea0| 69 6e 63 6c 75 64 65 20 | 3c 4c 6f 77 4d 65 6d 2e |include |<LowMem.|
|00000eb0| 68 3e 0d 23 65 6c 73 65 | 0d 09 23 64 65 66 69 6e |h>.#else|..#defin|
|00000ec0| 65 20 4c 4d 47 65 74 4d | 42 61 72 48 65 69 67 68 |e LMGetM|BarHeigh|
|00000ed0| 74 28 29 20 28 2a 20 28 | 73 68 6f 72 74 20 2a 29 |t() (* (|short *)|
|00000ee0| 20 30 78 30 42 41 41 29 | 0d 09 23 64 65 66 69 6e | 0x0BAA)|..#defin|
|00000ef0| 65 20 4c 4d 53 65 74 4d | 42 61 72 48 65 69 67 68 |e LMSetM|BarHeigh|
|00000f00| 74 28 4d 42 61 72 48 65 | 69 67 68 74 56 61 6c 75 |t(MBarHe|ightValu|
|00000f10| 65 29 20 28 28 2a 20 28 | 73 68 6f 72 74 20 2a 29 |e) ((* (|short *)|
|00000f20| 20 30 78 30 42 41 41 29 | 20 3d 20 28 4d 42 61 72 | 0x0BAA)| = (MBar|
|00000f30| 48 65 69 67 68 74 56 61 | 6c 75 65 29 29 0d 23 65 |HeightVa|lue)).#e|
|00000f40| 6e 64 69 66 0d 23 69 6e | 63 6c 75 64 65 20 22 6d |ndif.#in|clude "m|
|00000f50| 63 36 38 38 38 31 2e 68 | 22 0d 23 69 66 20 6d 63 |c68881.h|".#if mc|
|00000f60| 36 38 38 38 31 20 26 26 | 20 54 48 49 4e 4b 5f 43 |68881 &&| THINK_C|
|00000f70| 09 2f 2f 20 75 73 65 20 | 65 78 70 6c 69 63 69 74 |.// use |explicit|
|00000f80| 20 66 70 75 20 69 6e 73 | 74 72 75 63 74 69 6f 6e | fpu ins|truction|
|00000f90| 73 20 66 6f 72 20 68 69 | 67 68 65 73 74 20 70 6f |s for hi|ghest po|
|00000fa0| 73 73 69 62 6c 65 20 73 | 70 65 65 64 0d 09 23 75 |ssible s|peed..#u|
|00000fb0| 6e 64 65 66 20 65 78 70 | 0d 09 23 64 65 66 69 6e |ndef exp|..#defin|
|00000fc0| 65 20 65 78 70 20 5f 65 | 78 70 0d 23 65 6e 64 69 |e exp _e|xp.#endi|
|00000fd0| 66 0d 76 6f 69 64 20 47 | 72 61 74 69 6e 67 28 76 |f.void G|rating(v|
|00000fe0| 6f 69 64 29 3b 0d 23 64 | 65 66 69 6e 65 20 53 49 |oid);.#d|efine SI|
|00000ff0| 5a 45 20 33 30 30 0d 23 | 64 65 66 69 6e 65 20 50 |ZE 300.#|define P|
|00001000| 4f 57 45 52 56 49 45 57 | 20 30 0d 0d 76 6f 69 64 |OWERVIEW| 0..void|
|00001010| 20 6d 61 69 6e 28 76 6f | 69 64 29 0d 7b 0d 09 52 | main(vo|id).{..R|
|00001020| 65 71 75 69 72 65 28 67 | 65 73 74 61 6c 74 38 42 |equire(g|estalt8B|
|00001030| 69 74 51 44 29 3b 0d 09 | 47 72 61 74 69 6e 67 28 |itQD);..|Grating(|
|00001040| 29 3b 0d 7d 0d 0d 76 6f | 69 64 20 47 72 61 74 69 |);.}..vo|id Grati|
|00001050| 6e 67 28 76 6f 69 64 29 | 0d 7b 0d 09 73 68 6f 72 |ng(void)|.{..shor|
|00001060| 74 20 69 2c 6a 2c 65 72 | 72 6f 72 2c 63 6c 75 74 |t i,j,er|ror,clut|
|00001070| 53 69 7a 65 2c 70 69 78 | 65 6c 53 69 7a 65 2c 6f |Size,pix|elSize,o|
|00001080| 6c 64 50 69 78 65 6c 53 | 69 7a 65 2c 6f 6c 64 49 |ldPixelS|ize,oldI|
|00001090| 73 43 6f 6c 6f 72 2c 6d | 6f 64 65 3b 0d 09 73 68 |sColor,m|ode;..sh|
|000010a0| 6f 72 74 20 70 72 65 66 | 65 72 72 65 64 50 69 78 |ort pref|erredPix|
|000010b0| 65 6c 53 69 7a 65 5b 36 | 5d 3d 7b 38 2c 33 32 2c |elSize[6|]={8,32,|
|000010c0| 31 36 2c 34 2c 32 2c 31 | 7d 3b 09 2f 2f 20 4f 72 |16,4,2,1|};.// Or|
|000010d0| 64 65 72 20 6f 66 20 70 | 72 65 66 65 72 65 6e 63 |der of p|referenc|
|000010e0| 65 0d 09 47 44 48 61 6e | 64 6c 65 20 64 65 76 69 |e..GDHan|dle devi|
|000010f0| 63 65 3b 0d 09 73 74 61 | 74 69 63 20 43 6f 6c 6f |ce;..sta|tic Colo|
|00001100| 72 53 70 65 63 20 74 61 | 62 6c 65 5b 32 35 36 5d |rSpec ta|ble[256]|
|00001110| 3b 0d 09 57 69 6e 64 6f | 77 50 74 72 20 77 69 6e |;..Windo|wPtr win|
|00001120| 64 6f 77 2c 6f 6c 64 50 | 6f 72 74 3b 0d 09 52 65 |dow,oldP|ort;..Re|
|00001130| 63 74 20 72 3b 0d 09 64 | 6f 75 62 6c 65 20 61 2c |ct r;..d|ouble a,|
|00001140| 66 58 5b 53 49 5a 45 5d | 2c 66 59 5b 53 49 5a 45 |fX[SIZE]|,fY[SIZE|
|00001150| 5d 3b 0d 09 63 68 61 72 | 20 73 74 72 69 6e 67 5b |];..char| string[|
|00001160| 31 30 30 5d 3b 0d 09 50 | 6f 69 6e 74 20 70 74 3b |100];..P|oint pt;|
|00001170| 0d 09 42 6f 6f 6c 65 61 | 6e 20 73 61 76 65 50 69 |..Boolea|n savePi|
|00001180| 63 74 3d 31 2c 73 61 76 | 65 45 50 53 3d 31 3b 0d |ct=1,sav|eEPS=1;.|
|00001190| 09 0d 09 53 74 61 63 6b | 47 72 6f 77 28 31 30 30 |...Stack|Grow(100|
|000011a0| 30 30 29 3b 0d 09 23 69 | 66 20 28 54 48 49 4e 4b |00);..#i|f (THINK|
|000011b0| 5f 43 20 7c 7c 20 54 48 | 49 4e 4b 5f 43 50 4c 55 |_C || TH|INK_CPLU|
|000011c0| 53 29 0d 09 09 63 6f 6e | 73 6f 6c 65 5f 6f 70 74 |S)...con|sole_opt|
|000011d0| 69 6f 6e 73 2e 74 6f 70 | 20 3d 20 30 3b 0d 09 09 |ions.top| = 0;...|
|000011e0| 63 6f 6e 73 6f 6c 65 5f | 6f 70 74 69 6f 6e 73 2e |console_|options.|
|000011f0| 6c 65 66 74 20 3d 20 30 | 3b 0d 09 09 63 6f 6e 73 |left = 0|;...cons|
|00001200| 6f 6c 65 5f 6f 70 74 69 | 6f 6e 73 2e 6e 72 6f 77 |ole_opti|ons.nrow|
|00001210| 73 20 3d 20 34 3b 0d 09 | 09 63 6f 6e 73 6f 6c 65 |s = 4;..|.console|
|00001220| 5f 6f 70 74 69 6f 6e 73 | 2e 6e 63 6f 6c 73 20 3d |_options|.ncols =|
|00001230| 20 36 30 3b 0d 09 09 70 | 72 69 6e 74 66 28 22 5c | 60;...p|rintf("\|
|00001240| 6e 22 29 3b 0d 09 23 65 | 6c 69 66 20 5f 5f 4d 57 |n");..#e|lif __MW|
|00001250| 45 52 4b 53 5f 5f 0d 09 | 09 53 49 4f 55 58 53 65 |ERKS__..|.SIOUXSe|
|00001260| 74 74 69 6e 67 73 2e 74 | 6f 70 70 69 78 65 6c 3d |ttings.t|oppixel=|
|00001270| 4c 4d 47 65 74 4d 42 61 | 72 48 65 69 67 68 74 28 |LMGetMBa|rHeight(|
|00001280| 29 2b 31 3b 09 2f 2f 20 | 61 6c 6c 6f 77 20 66 6f |)+1;.// |allow fo|
|00001290| 72 20 6d 65 6e 75 20 62 | 61 72 20 6f 6e 6c 79 0d |r menu b|ar only.|
|000012a0| 09 09 53 49 4f 55 58 53 | 65 74 74 69 6e 67 73 2e |..SIOUXS|ettings.|
|000012b0| 6c 65 66 74 70 69 78 65 | 6c 3d 31 3b 0d 09 09 53 |leftpixe|l=1;...S|
|000012c0| 49 4f 55 58 53 65 74 74 | 69 6e 67 73 2e 72 6f 77 |IOUXSett|ings.row|
|000012d0| 73 3d 34 3b 0d 09 09 53 | 49 4f 55 58 53 65 74 74 |s=4;...S|IOUXSett|
|000012e0| 69 6e 67 73 2e 63 6f 6c | 75 6d 6e 73 3d 36 30 3b |ings.col|umns=60;|
|000012f0| 0d 09 09 53 49 4f 55 58 | 53 65 74 74 69 6e 67 73 |...SIOUX|Settings|
|00001300| 2e 61 75 74 6f 63 6c 6f | 73 65 6f 6e 71 75 69 74 |.autoclo|seonquit|
|00001310| 3d 30 3b 0d 09 09 53 49 | 4f 55 58 53 65 74 74 69 |=0;...SI|OUXSetti|
|00001320| 6e 67 73 2e 73 68 6f 77 | 73 74 61 74 75 73 6c 69 |ngs.show|statusli|
|00001330| 6e 65 3d 30 3b 0d 09 09 | 53 49 4f 55 58 53 65 74 |ne=0;...|SIOUXSet|
|00001340| 74 69 6e 67 73 2e 61 73 | 6b 74 6f 73 61 76 65 6f |tings.as|ktosaveo|
|00001350| 6e 63 6c 6f 73 65 3d 30 | 3b 0d 09 09 70 72 69 6e |nclose=0|;...prin|
|00001360| 74 66 28 22 5c 6e 22 29 | 3b 0d 09 23 65 6c 73 65 |tf("\n")|;..#else|
|00001370| 0d 09 09 49 6e 69 74 47 | 72 61 66 28 26 71 64 2e |...InitG|raf(&qd.|
|00001380| 74 68 65 50 6f 72 74 29 | 3b 0d 09 09 49 6e 69 74 |thePort)|;...Init|
|00001390| 46 6f 6e 74 73 28 29 3b | 0d 09 09 49 6e 69 74 57 |Fonts();|...InitW|
|000013a0| 69 6e 64 6f 77 73 28 29 | 3b 0d 09 09 49 6e 69 74 |indows()|;...Init|
|000013b0| 43 75 72 73 6f 72 28 29 | 3b 0d 09 23 65 6e 64 69 |Cursor()|;..#endi|
|000013c0| 66 0d 09 70 72 69 6e 74 | 66 28 22 57 65 6c 63 6f |f..print|f("Welco|
|000013d0| 6d 65 20 74 6f 20 47 72 | 61 74 69 6e 67 2e 5c 6e |me to Gr|ating.\n|
|000013e0| 22 29 3b 0d 09 47 65 74 | 50 6f 72 74 28 26 6f 6c |");..Get|Port(&ol|
|000013f0| 64 50 6f 72 74 29 3b 0d | 0d 09 2f 2a 20 46 69 6e |dPort);.|../* Fin|
|00001400| 64 20 64 65 76 69 63 65 | 20 63 6f 72 72 65 73 70 |d device| corresp|
|00001410| 6f 6e 64 69 6e 67 20 74 | 6f 20 74 68 65 20 65 78 |onding t|o the ex|
|00001420| 70 65 72 69 6d 65 6e 74 | 61 6c 20 73 63 72 65 65 |periment|al scree|
|00001430| 6e 2e 20 2a 2f 0d 09 66 | 6f 72 28 69 3d 38 3b 69 |n. */..f|or(i=8;i|
|00001440| 3e 3d 30 3b 69 2d 2d 29 | 7b 0d 09 09 64 65 76 69 |>=0;i--)|{...devi|
|00001450| 63 65 20 3d 20 47 65 74 | 53 63 72 65 65 6e 44 65 |ce = Get|ScreenDe|
|00001460| 76 69 63 65 28 69 29 3b | 0d 09 09 69 66 28 64 65 |vice(i);|...if(de|
|00001470| 76 69 63 65 21 3d 4e 55 | 4c 4c 29 20 62 72 65 61 |vice!=NU|LL) brea|
|00001480| 6b 3b 0d 09 7d 0d 09 64 | 6f 7b 0d 09 09 69 66 28 |k;..}..d|o{...if(|
|00001490| 47 65 74 53 63 72 65 65 | 6e 44 65 76 69 63 65 28 |GetScree|nDevice(|
|000014a0| 31 29 21 3d 4e 55 4c 4c | 29 69 3d 43 68 6f 6f 73 |1)!=NULL|)i=Choos|
|000014b0| 65 53 63 72 65 65 6e 28 | 69 2c 22 57 68 69 63 68 |eScreen(|i,"Which|
|000014c0| 20 73 63 72 65 65 6e 3f | 22 29 3b 0d 09 09 65 6c | screen?|");...el|
|000014d0| 73 65 20 69 3d 30 3b 0d | 09 09 64 65 76 69 63 65 |se i=0;.|..device|
|000014e0| 3d 47 65 74 53 63 72 65 | 65 6e 44 65 76 69 63 65 |=GetScre|enDevice|
|000014f0| 28 69 29 3b 0d 09 7d 77 | 68 69 6c 65 28 64 65 76 |(i);..}w|hile(dev|
|00001500| 69 63 65 3d 3d 4e 55 4c | 4c 29 3b 0d 09 0d 09 2f |ice==NUL|L);..../|
|00001510| 2f 20 54 72 79 20 74 6f | 20 67 65 74 20 74 68 65 |/ Try to| get the|
|00001520| 20 62 65 73 74 20 70 6f | 73 73 69 62 6c 65 20 70 | best po|ssible p|
|00001530| 69 78 65 6c 53 69 7a 65 | 2e 0d 09 6f 6c 64 50 69 |ixelSize|...oldPi|
|00001540| 78 65 6c 53 69 7a 65 3d | 28 2a 2a 28 2a 2a 64 65 |xelSize=|(**(**de|
|00001550| 76 69 63 65 29 2e 67 64 | 50 4d 61 70 29 2e 70 69 |vice).gd|PMap).pi|
|00001560| 78 65 6c 53 69 7a 65 3b | 0d 09 6f 6c 64 49 73 43 |xelSize;|..oldIsC|
|00001570| 6f 6c 6f 72 3d 54 65 73 | 74 44 65 76 69 63 65 41 |olor=Tes|tDeviceA|
|00001580| 74 74 72 69 62 75 74 65 | 28 64 65 76 69 63 65 2c |ttribute|(device,|
|00001590| 67 64 44 65 76 54 79 70 | 65 29 3b 0d 09 69 66 28 |gdDevTyp|e);..if(|
|000015a0| 6f 6c 64 50 69 78 65 6c | 53 69 7a 65 21 3d 70 72 |oldPixel|Size!=pr|
|000015b0| 65 66 65 72 72 65 64 50 | 69 78 65 6c 53 69 7a 65 |eferredP|ixelSize|
|000015c0| 5b 30 5d 20 26 26 20 4e | 65 77 50 61 6c 65 74 74 |[0] && N|ewPalett|
|000015d0| 65 4d 61 6e 61 67 65 72 | 28 29 29 7b 0d 09 09 66 |eManager|()){...f|
|000015e0| 6f 72 28 69 3d 30 3b 69 | 3c 73 69 7a 65 6f 66 28 |or(i=0;i|<sizeof(|
|000015f0| 70 72 65 66 65 72 72 65 | 64 50 69 78 65 6c 53 69 |preferre|dPixelSi|
|00001600| 7a 65 29 2f 73 69 7a 65 | 6f 66 28 2a 70 72 65 66 |ze)/size|of(*pref|
|00001610| 65 72 72 65 64 50 69 78 | 65 6c 53 69 7a 65 29 3b |erredPix|elSize);|
|00001620| 69 2b 2b 29 7b 0d 09 09 | 09 69 66 28 6f 6c 64 50 |i++){...|.if(oldP|
|00001630| 69 78 65 6c 53 69 7a 65 | 3d 3d 70 72 65 66 65 72 |ixelSize|==prefer|
|00001640| 72 65 64 50 69 78 65 6c | 53 69 7a 65 5b 69 5d 20 |redPixel|Size[i] |
|00001650| 26 26 20 6f 6c 64 49 73 | 43 6f 6c 6f 72 29 62 72 |&& oldIs|Color)br|
|00001660| 65 61 6b 3b 0d 09 09 09 | 6d 6f 64 65 3d 48 61 73 |eak;....|mode=Has|
|00001670| 44 65 70 74 68 28 64 65 | 76 69 63 65 2c 70 72 65 |Depth(de|vice,pre|
|00001680| 66 65 72 72 65 64 50 69 | 78 65 6c 53 69 7a 65 5b |ferredPi|xelSize[|
|00001690| 69 5d 2c 30 2c 30 29 3b | 0d 09 09 09 69 66 28 6d |i],0,0);|....if(m|
|000016a0| 6f 64 65 21 3d 30 29 7b | 0d 09 09 09 09 70 72 69 |ode!=0){|.....pri|
|000016b0| 6e 74 66 28 22 43 68 61 | 6e 67 69 6e 67 20 70 69 |ntf("Cha|nging pi|
|000016c0| 78 65 6c 53 69 7a 65 20 | 74 6f 20 25 64 20 62 69 |xelSize |to %d bi|
|000016d0| 74 73 2c 20 63 6f 6c 6f | 72 2e 5c 6e 22 2c 28 69 |ts, colo|r.\n",(i|
|000016e0| 6e 74 29 70 72 65 66 65 | 72 72 65 64 50 69 78 65 |nt)prefe|rredPixe|
|000016f0| 6c 53 69 7a 65 5b 69 5d | 29 3b 0d 09 09 09 09 65 |lSize[i]|);.....e|
|00001700| 72 72 6f 72 3d 53 65 74 | 44 65 70 74 68 28 64 65 |rror=Set|Depth(de|
|00001710| 76 69 63 65 2c 70 72 65 | 66 65 72 72 65 64 50 69 |vice,pre|ferredPi|
|00001720| 78 65 6c 53 69 7a 65 5b | 69 5d 2c 31 3c 3c 67 64 |xelSize[|i],1<<gd|
|00001730| 44 65 76 54 79 70 65 2c | 31 29 3b 09 2f 2f 20 63 |DevType,|1);.// c|
|00001740| 6f 6c 6f 72 0d 09 09 09 | 09 62 72 65 61 6b 3b 0d |olor....|.break;.|
|00001750| 09 09 09 7d 0d 09 09 7d | 0d 09 7d 0d 09 70 69 78 |...}...}|..}..pix|
|00001760| 65 6c 53 69 7a 65 3d 28 | 2a 2a 28 2a 2a 64 65 76 |elSize=(|**(**dev|
|00001770| 69 63 65 29 2e 67 64 50 | 4d 61 70 29 2e 70 69 78 |ice).gdP|Map).pix|
|00001780| 65 6c 53 69 7a 65 3b 0d | 0d 09 73 61 76 65 50 69 |elSize;.|..savePi|
|00001790| 63 74 3d 43 68 6f 6f 73 | 65 28 73 61 76 65 50 69 |ct=Choos|e(savePi|
|000017a0| 63 74 2c 22 53 61 76 65 | 20 67 72 61 74 69 6e 67 |ct,"Save| grating|
|000017b0| 20 74 6f 20 64 69 73 6b | 20 61 73 20 61 20 50 49 | to disk| as a PI|
|000017c0| 43 54 20 66 69 6c 65 3f | 5c 6e 22 2c 6e 6f 59 65 |CT file?|\n",noYe|
|000017d0| 73 2c 32 29 3b 0d 09 73 | 61 76 65 45 50 53 3d 43 |s,2);..s|aveEPS=C|
|000017e0| 68 6f 6f 73 65 28 73 61 | 76 65 45 50 53 2c 22 53 |hoose(sa|veEPS,"S|
|000017f0| 61 76 65 20 67 72 61 74 | 69 6e 67 20 74 6f 20 64 |ave grat|ing to d|
|00001800| 69 73 6b 20 61 73 20 61 | 6e 20 45 50 53 20 66 69 |isk as a|n EPS fi|
|00001810| 6c 65 3f 5c 6e 22 2c 6e | 6f 59 65 73 2c 32 29 3b |le?\n",n|oYes,2);|
|00001820| 0d 09 0d 09 2f 2f 20 4c | 6f 61 64 20 74 68 65 20 |....// L|oad the |
|00001830| 63 6c 75 74 20 77 69 74 | 68 20 61 20 67 72 61 79 |clut wit|h a gray|
|00001840| 73 63 61 6c 65 20 72 61 | 6d 70 2e 0d 09 47 44 53 |scale ra|mp...GDS|
|00001850| 61 76 65 47 61 6d 6d 61 | 28 64 65 76 69 63 65 29 |aveGamma|(device)|
|00001860| 3b 0d 09 47 44 55 6e 63 | 6f 72 72 65 63 74 65 64 |;..GDUnc|orrected|
|00001870| 47 61 6d 6d 61 28 64 65 | 76 69 63 65 29 3b 09 2f |Gamma(de|vice);./|
|00001880| 2f 20 54 65 6c 6c 20 74 | 68 65 20 64 72 69 76 65 |/ Tell t|he drive|
|00001890| 72 20 74 6f 20 66 61 69 | 74 68 66 75 6c 6c 79 20 |r to fai|thfully |
|000018a0| 63 6f 70 79 20 6f 75 72 | 20 63 6f 6c 6f 72 73 20 |copy our| colors |
|000018b0| 69 6e 74 6f 20 0d 09 09 | 09 09 09 09 09 09 2f 2f |into ...|......//|
|000018c0| 20 74 68 65 20 63 6c 75 | 74 20 77 69 74 68 6f 75 | the clu|t withou|
|000018d0| 74 20 61 6e 79 20 74 72 | 61 6e 73 66 6f 72 6d 61 |t any tr|ansforma|
|000018e0| 74 69 6f 6e 2e 0d 09 63 | 6c 75 74 53 69 7a 65 3d |tion...c|lutSize=|
|000018f0| 47 44 43 6c 75 74 53 69 | 7a 65 28 64 65 76 69 63 |GDClutSi|ze(devic|
|00001900| 65 29 3b 0d 09 66 6f 72 | 28 69 3d 30 3b 69 3c 63 |e);..for|(i=0;i<c|
|00001910| 6c 75 74 53 69 7a 65 3b | 69 2b 2b 29 7b 0d 09 09 |lutSize;|i++){...|
|00001920| 74 61 62 6c 65 5b 69 5d | 2e 72 67 62 2e 72 65 64 |table[i]|.rgb.red|
|00001930| 3d 74 61 62 6c 65 5b 69 | 5d 2e 72 67 62 2e 67 72 |=table[i|].rgb.gr|
|00001940| 65 65 6e 3d 74 61 62 6c | 65 5b 69 5d 2e 72 67 62 |een=tabl|e[i].rgb|
|00001950| 2e 62 6c 75 65 3d 69 2a | 28 6c 6f 6e 67 29 30 78 |.blue=i*|(long)0x|
|00001960| 66 66 66 66 2f 28 63 6c | 75 74 53 69 7a 65 2d 31 |ffff/(cl|utSize-1|
|00001970| 29 3b 0d 09 7d 0d 09 65 | 72 72 6f 72 3d 47 44 53 |);..}..e|rror=GDS|
|00001980| 65 74 45 6e 74 72 69 65 | 73 42 79 54 79 70 65 28 |etEntrie|sByType(|
|00001990| 64 65 76 69 63 65 2c 30 | 2c 63 6c 75 74 53 69 7a |device,0|,clutSiz|
|000019a0| 65 2d 31 2c 74 61 62 6c | 65 29 3b 0d 0d 09 2f 2f |e-1,tabl|e);...//|
|000019b0| 20 4f 70 65 6e 20 77 69 | 6e 64 6f 77 20 61 6e 64 | Open wi|ndow and|
|000019c0| 20 70 75 74 20 67 72 61 | 74 69 6e 67 20 69 6e 20 | put gra|ting in |
|000019d0| 69 74 2e 0d 09 77 69 6e | 64 6f 77 3d 47 44 4f 70 |it...win|dow=GDOp|
|000019e0| 65 6e 57 69 6e 64 6f 77 | 31 28 64 65 76 69 63 65 |enWindow|1(device|
|000019f0| 29 3b 0d 09 53 65 74 50 | 6f 72 74 28 77 69 6e 64 |);..SetP|ort(wind|
|00001a00| 6f 77 29 3b 0d 09 50 6d | 42 61 63 6b 43 6f 6c 6f |ow);..Pm|BackColo|
|00001a10| 72 28 28 63 6c 75 74 53 | 69 7a 65 2d 31 29 2f 32 |r((clutS|ize-1)/2|
|00001a20| 29 3b 09 2f 2f 20 54 68 | 69 73 20 77 6f 72 6b 73 |);.// Th|is works|
|00001a30| 20 62 65 63 61 75 73 65 | 20 47 44 4f 70 65 6e 57 | because| GDOpenW|
|00001a40| 69 6e 64 6f 77 31 20 6d | 61 72 6b 65 64 0d 09 45 |indow1 m|arked..E|
|00001a50| 72 61 73 65 52 65 63 74 | 28 26 77 69 6e 64 6f 77 |raseRect|(&window|
|00001a60| 2d 3e 70 6f 72 74 52 65 | 63 74 29 3b 09 2f 2f 20 |->portRe|ct);.// |
|00001a70| 61 6c 6c 20 74 68 65 20 | 63 6f 6c 6f 72 73 20 61 |all the |colors a|
|00001a80| 73 20 70 6d 45 78 70 6c | 69 63 69 74 2e 0d 09 53 |s pmExpl|icit...S|
|00001a90| 65 74 52 65 63 74 28 26 | 72 2c 30 2c 30 2c 53 49 |etRect(&|r,0,0,SI|
|00001aa0| 5a 45 2c 53 49 5a 45 29 | 3b 0d 09 43 65 6e 74 65 |ZE,SIZE)|;..Cente|
|00001ab0| 72 52 65 63 74 49 6e 52 | 65 63 74 28 26 72 2c 26 |rRectInR|ect(&r,&|
|00001ac0| 77 69 6e 64 6f 77 2d 3e | 70 6f 72 74 52 65 63 74 |window->|portRect|
|00001ad0| 29 3b 0d 09 66 6f 72 28 | 69 3d 30 3b 69 3c 53 49 |);..for(|i=0;i<SI|
|00001ae0| 5a 45 3b 69 2b 2b 29 7b | 0d 09 09 61 3d 28 69 2d |ZE;i++){|...a=(i-|
|00001af0| 53 49 5a 45 2f 32 29 2f | 28 53 49 5a 45 2f 36 2e |SIZE/2)/|(SIZE/6.|
|00001b00| 29 3b 0d 09 09 66 59 5b | 69 5d 3d 65 78 70 28 2d |);...fY[|i]=exp(-|
|00001b10| 61 2a 61 29 3b 0d 09 09 | 66 58 5b 69 5d 3d 66 59 |a*a);...|fX[i]=fY|
|00001b20| 5b 69 5d 2a 73 69 6e 28 | 28 69 2d 53 49 5a 45 2f |[i]*sin(|(i-SIZE/|
|00001b30| 32 29 2a 28 32 2e 30 2a | 50 49 2f 38 30 2e 30 29 |2)*(2.0*|PI/80.0)|
|00001b40| 29 3b 0d 09 7d 0d 09 70 | 74 2e 68 3d 70 74 2e 76 |);..}..p|t.h=pt.v|
|00001b50| 3d 30 3b 0d 09 4c 6f 63 | 61 6c 54 6f 47 6c 6f 62 |=0;..Loc|alToGlob|
|00001b60| 61 6c 28 26 70 74 29 3b | 0d 09 53 68 69 65 6c 64 |al(&pt);|..Shield|
|00001b70| 43 75 72 73 6f 72 28 26 | 72 2c 70 74 29 3b 0d 09 |Cursor(&|r,pt);..|
|00001b80| 66 6f 72 28 6a 3d 30 3b | 6a 3c 53 49 5a 45 3b 6a |for(j=0;|j<SIZE;j|
|00001b90| 2b 2b 29 7b 0d 09 09 75 | 6e 73 69 67 6e 65 64 20 |++){...u|nsigned |
|00001ba0| 6c 6f 6e 67 20 72 6f 77 | 5b 53 49 5a 45 5d 3b 0d |long row|[SIZE];.|
|00001bb0| 09 09 66 6f 72 28 69 3d | 30 3b 69 3c 53 49 5a 45 |..for(i=|0;i<SIZE|
|00001bc0| 3b 69 2b 2b 29 20 72 6f | 77 5b 69 5d 3d 30 2e 35 |;i++) ro|w[i]=0.5|
|00001bd0| 2b 28 63 6c 75 74 53 69 | 7a 65 2d 31 29 2a 30 2e |+(clutSi|ze-1)*0.|
|00001be0| 35 2a 28 31 2e 30 2b 66 | 59 5b 6a 5d 2a 66 58 5b |5*(1.0+f|Y[j]*fX[|
|00001bf0| 69 5d 29 3b 0d 09 09 69 | 66 28 70 69 78 65 6c 53 |i]);...i|f(pixelS|
|00001c00| 69 7a 65 3d 3d 31 36 29 | 66 6f 72 28 69 3d 30 3b |ize==16)|for(i=0;|
|00001c10| 69 3c 53 49 5a 45 3b 69 | 2b 2b 29 20 72 6f 77 5b |i<SIZE;i|++) row[|
|00001c20| 69 5d 2a 3d 31 2b 28 31 | 3c 3c 35 29 2b 28 31 3c |i]*=1+(1|<<5)+(1<|
|00001c30| 3c 31 30 29 3b 0d 09 09 | 69 66 28 70 69 78 65 6c |<10);...|if(pixel|
|00001c40| 53 69 7a 65 3d 3d 33 32 | 29 66 6f 72 28 69 3d 30 |Size==32|)for(i=0|
|00001c50| 3b 69 3c 53 49 5a 45 3b | 69 2b 2b 29 20 72 6f 77 |;i<SIZE;|i++) row|
|00001c60| 5b 69 5d 2a 3d 31 2b 28 | 31 3c 3c 38 29 2b 28 31 |[i]*=1+(|1<<8)+(1|
|00001c70| 55 4c 3c 3c 31 36 29 3b | 0d 09 09 53 65 74 50 69 |UL<<16);|...SetPi|
|00001c80| 78 65 6c 73 51 75 69 63 | 6b 6c 79 28 72 2e 6c 65 |xelsQuic|kly(r.le|
|00001c90| 66 74 2c 72 2e 74 6f 70 | 2b 6a 2c 72 6f 77 2c 53 |ft,r.top|+j,row,S|
|00001ca0| 49 5a 45 29 3b 0d 09 7d | 0d 09 53 68 6f 77 43 75 |IZE);..}|..ShowCu|
|00001cb0| 72 73 6f 72 28 29 3b 0d | 09 69 66 28 73 61 76 65 |rsor();.|.if(save|
|00001cc0| 50 69 63 74 29 7b 0d 09 | 09 50 69 78 4d 61 70 54 |Pict){..|.PixMapT|
|00001cd0| 6f 50 49 43 54 28 22 67 | 72 61 74 69 6e 67 2e 70 |oPICT("g|rating.p|
|00001ce0| 69 63 74 22 2c 28 28 43 | 57 69 6e 64 6f 77 50 74 |ict",((C|WindowPt|
|00001cf0| 72 29 77 69 6e 64 6f 77 | 29 2d 3e 70 6f 72 74 50 |r)window|)->portP|
|00001d00| 69 78 4d 61 70 0d 09 09 | 09 2c 26 72 2c 32 2c 4e |ixMap...|.,&r,2,N|
|00001d10| 55 4c 4c 29 3b 0d 09 09 | 70 72 69 6e 74 66 28 22 |ULL);...|printf("|
|00001d20| 49 6d 61 67 65 20 77 61 | 73 20 73 61 76 65 64 20 |Image wa|s saved |
|00001d30| 74 6f 20 64 69 73 6b 20 | 61 73 20 66 69 6c 65 20 |to disk |as file |
|00001d40| d2 67 72 61 74 69 6e 67 | 2e 70 69 63 74 d3 2e 5c |.grating|.pict..\|
|00001d50| 6e 22 29 3b 0d 09 7d 0d | 09 69 66 28 73 61 76 65 |n");..}.|.if(save|
|00001d60| 45 50 53 29 7b 0d 09 09 | 57 69 6e 64 6f 77 54 6f |EPS){...|WindowTo|
|00001d70| 45 50 53 28 28 43 57 69 | 6e 64 6f 77 50 74 72 29 |EPS((CWi|ndowPtr)|
|00001d80| 77 69 6e 64 6f 77 2c 22 | 67 72 61 74 69 6e 67 2e |window,"|grating.|
|00001d90| 65 70 73 22 2c 26 72 2c | 26 72 2c 30 2c 30 2c 4e |eps",&r,|&r,0,0,N|
|00001da0| 55 4c 4c 29 3b 0d 09 09 | 70 72 69 6e 74 66 28 22 |ULL);...|printf("|
|00001db0| 49 6d 61 67 65 20 77 61 | 73 20 73 61 76 65 64 20 |Image wa|s saved |
|00001dc0| 74 6f 20 64 69 73 6b 20 | 61 73 20 66 69 6c 65 20 |to disk |as file |
|00001dd0| d2 67 72 61 74 69 6e 67 | 2e 65 70 73 2e 5c 6e 22 |.grating|.eps.\n"|
|00001de0| 29 3b 0d 09 7d 0d 09 53 | 65 74 50 6f 72 74 28 28 |);..}..S|etPort((|
|00001df0| 57 69 6e 64 6f 77 50 74 | 72 29 6f 6c 64 50 6f 72 |WindowPt|r)oldPor|
|00001e00| 74 29 3b 0d 09 70 72 69 | 6e 74 66 28 22 44 6f 6e |t);..pri|ntf("Don|
|00001e10| 65 2e 20 48 69 74 20 72 | 65 74 75 72 6e 20 74 6f |e. Hit r|eturn to|
|00001e20| 20 71 75 69 74 2e 5c 6e | 22 29 3b 0d 09 67 65 74 | quit.\n|");..get|
|00001e30| 73 28 73 74 72 69 6e 67 | 29 3b 0d 09 47 44 44 69 |s(string|);..GDDi|
|00001e40| 73 70 6f 73 65 57 69 6e | 64 6f 77 31 28 77 69 6e |sposeWin|dow1(win|
|00001e50| 64 6f 77 29 3b 0d 09 47 | 44 52 65 73 74 6f 72 65 |dow);..G|DRestore|
|00001e60| 47 61 6d 6d 61 28 64 65 | 76 69 63 65 29 3b 0d 09 |Gamma(de|vice);..|
|00001e70| 47 44 52 65 73 74 6f 72 | 65 44 65 76 69 63 65 43 |GDRestor|eDeviceC|
|00001e80| 6c 75 74 28 64 65 76 69 | 63 65 29 3b 0d 09 2f 2f |lut(devi|ce);..//|
|00001e90| 20 72 65 73 74 6f 72 65 | 0d 09 65 72 72 6f 72 3d | restore|..error=|
|00001ea0| 53 65 74 44 65 70 74 68 | 28 64 65 76 69 63 65 2c |SetDepth|(device,|
|00001eb0| 6f 6c 64 50 69 78 65 6c | 53 69 7a 65 2c 31 3c 3c |oldPixel|Size,1<<|
|00001ec0| 67 64 44 65 76 54 79 70 | 65 2c 6f 6c 64 49 73 43 |gdDevTyp|e,oldIsC|
|00001ed0| 6f 6c 6f 72 29 3b 0d 09 | 23 69 66 20 28 54 48 49 |olor);..|#if (THI|
|00001ee0| 4e 4b 5f 43 20 7c 7c 20 | 54 48 49 4e 4b 5f 43 50 |NK_C || |THINK_CP|
|00001ef0| 4c 55 53 29 0d 09 09 61 | 62 6f 72 74 28 29 3b 0d |LUS)...a|bort();.|
|00001f00| 09 23 65 6c 69 66 20 5f | 5f 4d 57 45 52 4b 53 5f |.#elif _|_MWERKS_|
|00001f10| 5f 0d 09 09 53 49 4f 55 | 58 53 65 74 74 69 6e 67 |_...SIOU|XSetting|
|00001f20| 73 2e 61 75 74 6f 63 6c | 6f 73 65 6f 6e 71 75 69 |s.autocl|oseonqui|
|00001f30| 74 3d 31 3b 0d 09 23 65 | 6e 64 69 66 0d 7d 0d 00 |t=1;..#e|ndif.}..|
|00001f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f80| 00 00 01 00 00 00 01 86 | 00 00 00 86 00 00 00 66 |........|.......f|
|00001f90| 00 00 00 02 05 54 72 61 | 73 68 00 00 00 00 00 00 |.....Tra|sh......|
|00001fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fb0| 09 47 72 61 74 69 6e 67 | 2e 63 02 00 00 00 50 61 |.Grating|.c....Pa|
|00001fc0| 72 74 53 49 54 21 00 00 | 00 00 00 00 00 00 00 00 |rtSIT!..|........|
|00001fd0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00001fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ff0| 00 00 ab bf ee 29 00 00 | 00 00 00 00 01 ec 20 4c |.....)..|...... L|
|00002000| 6f 67 5d 00 00 00 00 00 | 00 00 00 73 25 00 00 00 |og].....|...s%...|
|00002010| 00 02 1a 5b 44 69 73 6b | 45 78 70 72 65 73 73 20 |...[Disk|Express |
|00002020| 41 63 74 69 76 69 74 79 | 20 4c 6f 67 5d 00 00 00 |Activity| Log]...|
|00002030| 00 00 00 00 00 73 25 00 | 00 00 00 02 1a 5b 44 69 |.....s%.|.....[Di|
|00002040| 73 6b 45 78 70 72 65 73 | 73 20 41 63 74 69 76 69 |skExpres|s Activi|
|00002050| 74 79 20 4c 6f 67 5d 00 | 00 00 00 00 00 00 00 73 |ty Log].|.......s|
|00002060| 25 00 00 00 00 02 1a 5b | 44 69 73 6b 45 78 70 72 |%......[|DiskExpr|
|00002070| 65 73 73 20 41 63 74 69 | 76 69 74 79 20 4c 6f 67 |ess Acti|vity Log|
|00002080| 00 00 00 0a 00 00 18 74 | 00 a4 00 00 00 00 00 00 |.......t|........|
|00002090| 00 20 00 02 00 00 0d f8 | 00 00 0d fc 05 6d 61 69 |. ......|.....mai|
|000020a0| 6e 00 00 00 0e 32 00 00 | 0e 39 07 47 72 61 74 69 |n....2..|.9.Grati|
|000020b0| 6e 67 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |ng...H..|Monaco..|
|000020c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020d0| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 3e 00 04 |........|.....>..|
|000020e0| 01 cd 02 63 00 3e 00 04 | 01 cd 02 63 ab b9 e8 9e |...c.>..|...c....|
|000020f0| 00 00 0d 74 00 00 0d 74 | 00 00 0e 69 00 00 00 00 |...t...t|...i....|
|00002100| 00 04 00 01 00 01 00 00 | 01 00 00 00 01 86 00 00 |........|........|
|00002110| 00 86 00 00 00 66 00 50 | 3c 38 2a 9a 00 00 00 1c |.....f.P|<8*.....|
|00002120| 00 66 00 02 42 4b 50 54 | 00 00 00 1a 4d 50 53 52 |.f..BKPT|....MPSR|
|00002130| 00 01 00 26 4d 57 42 42 | 00 00 00 3e 52 a0 ff ff |...&MWBB|...>R...|
|00002140| 00 00 00 00 00 00 00 00 | 03 ef ff ff 00 00 00 0e |........|........|
|00002150| 00 00 00 00 03 ed ff ff | 00 00 00 32 00 00 00 00 |........|...2....|
|00002160| 03 f0 ff ff 00 00 00 7e | 00 00 00 00 00 00 00 00 |.......~|........|
|00002170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+